#include <bits/stdc++.h>
using namespace std;

void solve(){
    int n;
    cin >> n;
    string s;
    cin >> s;
    if(n & 1){
        cout << -1 << endl;
        return;
    }
    vector<int> ans;
    int cnt = 300;
    while(cnt--){
        int i = 0, j = s.size() - 1;
        while(i < j){
            if(s[i] == s[j]){
                if(s[i] == '1'){
                    ans.push_back(i);
                    s.insert(i, "01");
                }else{
                    ans.push_back(j + 1);
                    s.insert(j + 1,"01");
                }
                break;
            }
            i++, j--;
        }
        if(i >= j){
            cout << ans.size() << endl;
            for(auto x : ans){
                cout << x << ' ';
            }
            cout << endl;
            return;
        }
    }
    cout << -1 << endl;
    
}

int main(){
    int t;
    cin >> t;
    while(t--) solve();
    return 0;
}